package com.yhc.order.server.exception;


import com.yhc.common.exception.ServiceException;
import lombok.Getter;

@Getter
public class OrderServiceException extends ServiceException {

    private String errorCode;
    private String errorMessage;

    public OrderServiceException(String errorCode, String errorMessage) {
        super(errorCode + "-" + errorMessage);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public OrderServiceException(ErrorCodeEnum error) {
        super(error.getCode() + "-" + error.getMessage());
        this.errorCode = error.getCode();
        this.errorMessage = error.getMessage();
    }


}
